1. Field of the Invention
The present invention relates to a method and apparatus of anisotropic texture filtering to obtain high quality image for three-dimensional graphics. More particularly, the invention relates to an anisotropic texture filtering method and apparatus using area coverage weight of sub-texel precision.
For three-dimensional graphics having much application in the industry fields of personal computers and high-performance games, texture mapping is one of the most efficient and typical algorithms representing the visual realism of a generated image.
2. Description of the Related Art
Until these days methods using tri-linear filtering have generally been used. However, as it becomes an apparent trend to adopt high quality visualization, anisotropic texture filtering has made frequent appearances. Anisotropic texture filtering can be divided into two categories depending on the schemes used.
For the first type of scheme, the footprint, which is mapping of a pixel onto a texture area, is approximated by a parallelogram and then texels are sampled along the longer one of the two sides of the parallelogram to obtain texture filtered value. This scheme is applied for cases of large computational cost.
However, this scheme has a disadvantage of not providing acceptable image quality for real-time applications. This has been disclosed in U.S. Pat. No. 6,005,582.
For the second type of scheme, a rectangular region is set up to enclose a footprint and then filtering is performed by applying weights to texels contained in the rectangular region. This scheme renders acceptable quality of images for real-time applications. Here is introduced an area coverage weight, which is defined as the fraction that the relevant texel is covered by the footprint. This is again classified into two methods depending on how the area coverage weight is obtained.
The first method pre-determines the area coverage weights according to the shape of the relevant footprint kept in a tabular form and obtains the area coverage weight by using four vertices of the footprint as table address. However, this has a disadvantage that the table size is too large for hardware implementation.
The second method determines the weight of the relevant texel according to whether the center of the texel is enclosed by that footprint. In this method, the weight is 1 if the center of texel is enclosed by the footprint, and 0 otherwise.
To test if a texel center is enclosed by a footprint, the four sides of the footprint is expressed by four line equations surrounding the footprint in a certain direction, e.g., clockwise, and it is decided to be enclosed if all the values resulted from inputting the coordinates of the texel center to the four equations are positive.
Further, to enhance image quality in this method, a texel is divided into sub-texels and the enclosure test is performed for each sub-texel, and then the number of sub-texels enclosed by the footprint is used as the weight for filtering. This has been disclosed in U.S. Pat. No. 6,097,397.
This method is conceptually similar to super-sampling that is used for antialiasing of three-dimensional graphics and has a disadvantage of a low precision due to approximation made for the area coverage weight for the footprint of concerned texel.
Another disadvantage of the method is its heavy computational burden that is due to the fact that the footprint enclosure test is performed by each sub-texel. Moreover, both of the two aforementioned methods have the disadvantage that the area coverage weight is used just for weighting but Gaussian filter that can be used for enhancing image quality of visualization is not applicable.